@model Abc.Application.HtAdminServices.HtUserOut
@using Abc.Application;
@using Abc.Application.HtAdminServices
@{
    var SystemSetting = (SysSettingDto)ViewData["SysSetting"];
    ViewData["Title"] = SystemSetting?.WebName??"管理后台";
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title> @ViewData["Title"] </title>
    <!-- 依 赖 样 式 -->
    <link rel="stylesheet" href="~/lib/Pear-Admin-Layui/component/pear/css/pear.css" asp-append-version="true" />
    <!-- 加 载 样 式-->
    <link rel="stylesheet" href="~/lib/Pear-Admin-Layui/admin/css/loader.css" asp-append-version="true" />
    <!-- 布 局 样 式 -->
    <link rel="stylesheet" href="~/lib/Pear-Admin-Layui/admin/css/admin.css" asp-append-version="true" />
</head>
<!-- 结 构 代 码 -->
<body class="layui-layout-body pear-admin">
    <!-- 布 局 框 架 -->
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <!-- 菜 单 顶 部 -->
            <div class="layui-logo">
                <!-- 图 标 -->
                <img class="logo" src="~/img/logo.png" />
                <!-- 标 题 -->
                <span class="title">@(@SystemSetting?.WebName??"管理后台")</span>
            </div>
            <!-- 顶 部 左 侧 功 能 -->
            <ul class="layui-nav layui-layout-left">
                <li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
                <li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading=600></a></li>
            </ul>
            <!-- 多 系 统 菜 单 -->
            <div id="control" class="layui-layout-control"></div>
            <!-- 顶 部 右 侧 菜 单 -->
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item layui-hide-xs"><a href="#" class="fullScreen layui-icon layui-icon-screen-full" title="全屏"></a></li>
                <li class="layui-nav-item layui-hide-xs"><a href="#" class="layui-icon layui-icon-refresh refreshcache" title="刷新缓存" id="refreshcache"></a></li>
                <li class="layui-nav-item layui-hide-xs"><a href="https://gitee.com/co1024/AbcMvc" class="layui-icon layui-icon-website"></a></li>
                <li class="layui-nav-item layui-hide-xs message"></li>
                <li class="layui-nav-item user">
                    <!-- 头 像 -->
                    @{

                    }
                    <a class="layui-icon layui-icon-username" href="javascript:;"><span style="margin-left:10px;">@(@Model?.Account)</span></a>
                    <!-- 功 能 菜 单 -->
                    <dl class="layui-nav-child">
                        <dd><a user-menu-url="view/system/person.html" user-menu-id="5555" user-menu-title="基本资料">基本资料</a></dd>
                        <dd><a href="/HtAdmin/Login/LoginOutToLogin" class="logout1">注销登录</a></dd>
                    </dl>
                </li>
                <!-- 主 题 配 置 -->
                <li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
            </ul>
        </div>
        <!-- 侧 边 区 域 -->
        <div class="layui-side layui-bg-black">
            <!-- 菜 单 顶 部 -->
            <div class="layui-logo">
                <!-- 图 标 -->
                <img class="logo" src="~/img/logo.png" />
                <!-- 标 题 -->
                <span class="title">@(@SystemSetting?.WebName??"管理后台")</span>
            </div>
            <!-- 菜 单 内 容 -->
            <div class="layui-side-scroll">
                <div id="sideMenu"></div>
            </div>
        </div>
        <!-- 视 图 页 面 -->
        <div class="layui-body">
            <!-- 内 容 页 面 -->
            <div id="content"></div>
        </div>
        <!-- 页脚 -->
			<div class="layui-footer layui-text">
				<span class="left">
					<span>
					@*官网：<a href="http://www.pearadmin.com/team.html" target="_blank">www.pearadmin.com</a>&nbsp;&nbsp;&nbsp;*@
                    仓库：<a href="https://gitee.com/co1024/AbcMvc" target="_blank">gitee.com/pear-admin</a>
					</span>
				</span>
				<span class="center"></span>
				<span class="right"></span>
			</div>
        <!-- 遮 盖 层 -->
        <div class="pear-cover"></div>
        <!-- 加 载 动 画-->
        <div class="loader-main">
            <div class="loader"></div>
        </div>
    </div>
    <!-- 移 动 端 便 捷 操 作 -->
	<div class="pear-collapsed-pe collapse">
		<a href="#" class="layui-icon layui-icon-shrink-right"></a>
	</div>
    @Html.AntiForgeryToken()
    <!-- 依 赖 脚 本 -->
    <script src="~/lib/Pear-Admin-Layui/component/layui/layui.js" asp-append-version="true"></script>
    <script src="~/lib/Pear-Admin-Layui/component/pear/pear.js" asp-append-version="true"></script>
    <script src="~/lib/abc/abc.js" asp-append-version="true"></script>
    <script>
        abc.safeInit();
    </script>
    <!-- 框 架 初 始 化 -->
    <script>
        layui.use(['admin', 'jquery', 'convert', 'popup'], function () {
         var admin = layui.admin;
         var $ = layui.jquery;
         var convert = layui.convert;
         var popup = layui.popup;

         // 初始化顶部用户信息
         //admin.setAvatar("~/img/head.jpg", '@(@Model==null?"后台管理员" :(string.IsNullOrWhiteSpace(@Model?.Nick)? Model?.Account: @Model.Nick))');

         // 根目录下 pear.config.yml 文件为初始化配置
         // 你可以通过 admin.setConfigPath 方法修改配置文件位置
         // 你可以通过 admin.setConfigType 方法修改配置文件类型
         admin.setConfigType("json");
         admin.setConfigPath("../../config/htadmin.config.json");
         admin.render();

         // 登出逻辑
         admin.logout(function () {
          abc.post({
           url: '@(Url.Action("LoginOut", "Account"))'
           , success: function () {
            //popup.success("注销成功", function () {

            //})
            location.href = "@(Url.Action("Login", "Account", new { area = "HtAdmin" }))";
           }
          });

          // 注销逻辑 返回 true / false
          return true;
         });
         $("#refreshcache").on('click', function () {
          abc.refreshCache({url:'@(Url.Action("RefreshCache","Developer"))'});
         });

         // 初始化消息回调
         admin.message();

         // 重写消息回调 [消息列表点击事件]
         // admin.message(function(id, title, context, form) {});

        })
    </script>
</body>
</html>
